hvm: Only do hvm_disable() on HVM-enabled systems.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 28 Feb 2007 14:44:52 +0000 (14:44 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 28 Feb 2007 14:44:52 +0000 (14:44 +0000)
Original patch by Jan Beulich.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/crash.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/smp.c
xen/include/asm-x86/hvm/hvm.h
xen/include/asm-x86/hvm/support.h

index cae1768633eb2ff57dcb05d737d52a70851491d3..57e3af4d719fa7e7c3f5b9a120ffea701f9c8d74 100644 (file)
@@ -25,7 +25,7 @@
 #include <xen/sched.h>
 #include <public/xen.h>
 #include <asm/shared.h>
-#include <asm/hvm/hvm.h>
+#include <asm/hvm/support.h>
 
 static atomic_t waiting_for_crash_ipi;
 static unsigned int crashing_cpu;
index 326f3c0ed39e627232931ad36474d3923f22adef..453c4ff355b215c7dc98d7e755ccc35923487c9b 100644 (file)
@@ -76,6 +76,12 @@ void hvm_enable(struct hvm_function_table *fns)
     hvm_enabled = 1;
 }
 
+void hvm_disable(void)
+{
+    if ( hvm_enabled )
+        hvm_funcs.disable();
+}
+
 void hvm_stts(struct vcpu *v)
 {
     /* FPU state already dirty? Then no need to setup_fpu() lazily. */
index cc6739abea358a159615c0c515f6d21fafac90ce..072927cd6ce3087e3e1bc0df89c40835d2f94776 100644 (file)
@@ -21,7 +21,7 @@
 #include <asm/smpboot.h>
 #include <asm/hardirq.h>
 #include <asm/ipi.h>
-#include <asm/hvm/hvm.h>
+#include <asm/hvm/support.h>
 #include <mach_apic.h>
 
 /*
index 210ebe11644e143df9220abc6d89f4161a879b1a..3d3aa356836758c755480df702aad8cce13855bc 100644 (file)
@@ -140,15 +140,6 @@ struct hvm_function_table {
 
 extern struct hvm_function_table hvm_funcs;
 
-/*
- * For convenience, we use short hands.
- */
-static inline void
-hvm_disable(void)
-{
-    hvm_funcs.disable();
-}
-
 int hvm_domain_initialise(struct domain *d);
 void hvm_domain_destroy(struct domain *d);
 
index 6e43a0301c8b071c0530e9da242b098ee030647a..d8930ed3c02aaaa4f785c88f3b40dd2f53576a90 100644 (file)
@@ -258,6 +258,7 @@ extern char hvm_io_bitmap[];
 extern int hvm_enabled;
 
 void hvm_enable(struct hvm_function_table *);
+void hvm_disable(void);
 
 int hvm_copy_to_guest_phys(paddr_t paddr, void *buf, int size);
 int hvm_copy_from_guest_phys(void *buf, paddr_t paddr, int size);